package com.huibei.wateradmin.authority.domain;

import javax.persistence.Embeddable;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;

/**
 * Created by wanglinlin on 2016/8/2.
 */
@Embeddable
public class UserStatus {

    @Enumerated(EnumType.STRING)
    private Status status = Status.valid ;

    public UserStatus() {
    }

    public UserStatus(Status status) {
        this.status = status;
    }

    private enum Status {
        valid(1, "正常"),
        underreview(2, " 审核中"),
        invalid(0, " 已禁用");
        private final Integer value;
        private String content;

        Status(Integer value, String content) {
            this.value = value;
            this.content = content;
        }

        public Integer getValue() {
            return value;
        }

        public String getContent() {
            return content;
        }
    }
}
